package com.lingnan.eduservice.clientinterface;

import com.lingnan.common.utils.ResultEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 阿里视频点播功能接口模块
 * @FeignClient("service-vod") 调用服务名称 fallback 调用熔断后方法
 * @author zzd
 */
@FeignClient(name = "service-vod",fallback = VodClientFallBack.class)
@Component
public interface VodClient {
    // 远程调用方法

    /**
     * 根据视频ID在阿里云删除视频
     * @param videoSourceId
     * @return
     */
    @DeleteMapping("/vodService/video/deleteVideoByVideoSourceId/{videoSourceId}")
    @ApiOperation("根据视频ID在阿里云删除视频")
    public ResultEntity deleteVideoByVideoSourceId(@PathVariable("videoSourceId") String videoSourceId);


    /**
     * 批量删除视频
     * @param videoSourceIdList 所有视频ID
     * @return
     */
    @DeleteMapping("/vodService/video/deleteAllVideo")
    @ApiOperation("批量删除视频")
    public ResultEntity deleteAllVideo(@RequestParam("videoSourceIdList") List<String> videoSourceIdList);
}
